import React from "react";
import "./Mask.css";
import ReactDom from "react-dom";
const MaskRoot = document.querySelector("#mask-root");

const Mask = (props) => {
  // 被传送的组件
  return ReactDom.createPortal(
    <div className="mask">{props.children}</div>,
    MaskRoot
  );
};

export default Mask;
